package com.vipbbo.spring.bean;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;


public class AppTestIgnoredepencytype {

	@Test
	public void TestIgnore(){
		BeanFactory bf = new XmlBeanFactory( new ClassPathResource("spring-ignore.xml"));
//		ApplicationContext bf =
//				new ClassPathXmlApplicationContext("spring-ignore.xml");
//		((ConfigurableListableBeanFactory) bf ).ignoreDependencyInterface(IgnoreInterface.class);
		IgnoreInterfaceImpl bean = (IgnoreInterfaceImpl) bf.getBean(IgnoreInterface.class);
		System.out.println(bean.getList());
		System.out.println(bean.getSet());
	}
}
